package com.example.bgxqactivityservice.feign;

import com.example.bgxqapi.domain.ApiResult;
import com.example.bgxqapi.domain.send.SendMessage;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("WEBSOCKET-SERVICE")
public interface WebsocketService {

  @PostMapping("/bgxq/message/interactive/send")
  ApiResult<Boolean> sendInteractiveMessage(@RequestParam("toUserId") int toUserId,@RequestBody SendMessage<?> sendMessage,@RequestHeader("token") String token);

  @GetMapping("/bgxq/monitor/onlineSum")
  Integer onlineSum();
}
